//
//  HLLiveGiftListRequest.m
//  YueYue
//
//  Created by hulu001 on 2024/3/14.
//

#import "HLLiveGiftListRequest.h"

@implementation HLLiveGiftListRequest
{
    NSDictionary *_params;
}

- (id)initWithParams:(NSDictionary *)params
{
    self = [super init];
    
    if (self) {
        _params = params;
    }
    
    return self;
}



- (NSString *)requestUrl
{
    return @"/live/room/gift/config";
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

- (id)requestArgument
{
    if (_params){
        return _params;
    } else {
        return @{};
    }
}

- (NSArray <HLLiveGiftModel *> *)giftList
{
    NSArray *lists = @[];
    
    NSArray *records = [self.result valueForKey:@"data"];
    if (records.count > 0) {
       lists = [HLLiveGiftModel mj_objectArrayWithKeyValuesArray:records];
    }
    
    return lists;
}

@end
